<?php
session_start();
$url='./img/';
include './c/config.php';
include_once 'jssdk.php';
$jssdk = new JSSDK($appId, $secret);
$signPackage = @$jssdk->GetSignPackage();
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<title>Carrier</title>
<link rel="stylesheet" href="./js/swiper.min.css">
<style>
html,body{font-size:16px;background:#152c72;width:100%;font-size:12px;color:#fff;font-family:Microsoft YaHei, Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
body, div{position:relative;padding:0px;margin:0px auto;max-width:640px;height:100%;}
.weui-dialog{position:fixed;z-index:5000;width:80%;max-width:300px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#FFF;text-align:center;border-radius:3px;overflow:hidden}.weui-dialog__hd{padding:1.3em 1.6em .5em}.weui-dialog__title{font-weight:400;font-size:18px}.weui-dialog__bd{padding:0 1.6em .8em;min-height:40px;font-size:15px;line-height:1.3;word-wrap:break-word;word-break:break-all;color:#999}.weui-dialog__bd:first-child{padding:1.2em 20px .1em;color:#353535}.weui-dialog__ft{position:relative;line-height:48px;font-size:18px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.weui-dialog__btn{display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3CC51F;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative}.weui-dialog__btn:active{background-color:#EEE}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #D5D5D6;color:#D5D5D6;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:scaleX(.5);transform:scaleX(.5)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:#353535}.weui-dialog__btn_primary{color:#0BB20C}@media screen and (min-width:1024px){.weui-dialog{width:35%}}.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.6)}
.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}
.js_dialog{display:none;}
-webkit-touch-callout:none;
-webkit-user-select:none;
html{-ms-touch-action:none;}
div,img{-webkit-tap-highlight-color:rgba(0,0,0,0);}
*{-webkit-text-size-adjust: none;}
.simg{position:absolute;display:block;}
a{text-decoration:none;}
.txt{position:absolute;text-indent:8px;color:#000;font-size:12px;z-index:2;border:none;background:transparent;}
.txt::-webkit-input-placeholder {text-align:left;}
select{position:absolute;color:#fff;display:block;background:transparent;border:0px;text-indent:10px;font-size:12px;-webkit-appearance:none;}
.container{position:relative;width:100%;height:auto;overflow:hidden;}
.page, .paged{position:absolute;width:100%;height:100%;display:none;top:0px;left:0px;}
.p1{position:absolute;width:100%;height:100%;top:0px;left:0px;opacity:0;background:transparent url('./img/p1.jpg') no-repeat;background-size:cover;}
.fade-in{opacity:1;-webkit-transition:opacity 1s ease-in-out;-moz-transition: opacity 1s ease-in-out;-o-transition: opacity 1s ease-in-out;transition: opacity 1s ease-in-out;}
.kong{background:transparent url('./img/kong.jpg') no-repeat;background-size:cover;}
.iaq{background:transparent url('./img/iaq.jpg') no-repeat;background-size:cover;}
.t-bg{background-color:#000;opacity:.8;}
@-webkit-keyframes bos{0% {-webkit-transform:scale(1,1);opacity:1;} 100% {-webkit-transform:scale(1.4,1.4);opacity:0;}}
.bo{-webkit-animation: bos 1.2s infinite ease-out;}
.hide{display:none;}
.swiper-slide img{width:100%;height:100%;}
.swiper-pagination-bullet-active{background:#fff;}
.hua{background:transparent url('./img/2.jpg') no-repeat;background-size:cover;}
.t-bg{position:absolute;display:none;width:100%;height:100%;top:0px;left:0px;background-color:#000;opacity:.8;z-index:9;}
.contact{z-index:9;}
.contact-body{position:absolute;background:transparent url('./img/contact.png') no-repeat;background-size:cover;}
.contact-msg{padding:6px;}
.hua-utxt{padding:4px;}
.hua-title{position:absolute;color:#454545;font-size:12px;font-weight:700;line-height:170%;}
.hua-content{position:absolute;width:93%;left:0px;overflow-y:scroll;}
.hua-content::-webkit-scrollbar {width:8px;height: 1px;background:#ffffff;}
.hua-content::-webkit-scrollbar-thumb {border-radius: 8px;-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);background: #ffffff;}
.hua-content::-webkit-scrollbar-track {border-radius:8px;background: #e6e6e6;}
.hua-item{position:relative;width:100%;left:0px;margin:5px 0px 5px 0px}
.hua-msg{position:absolute;background:#fff;padding:0px 2px 0px 5px;color:#000;font-size:12px;border-radius:4px;border:.3px #e7e7e7 solid;box-shadow: 1px 1px 1px #dbdada;}
.hua-txt{width:100%;}
.hua-jiao{top:30%;}
.hua-shuo{position:absolute;background:#fff;width:100%;left:0px;}
.huxi{background:transparent url('./img/3.jpg') no-repeat;background-size:cover;}
.contact-us, .navbar-open, .top-home{z-index:6;}
.top-nav2{z-index:4;}
.t-nav{position:absolute;display:none;z-index:3;left:0px;color:#828282;font-size:13px;background:#fff;border-right:2px #f0f0f0 solid;border-bottom:2px #f0f0f0 solid;box-shadow:2px 1px 14px #f1f1f1;}
.t-navtxt{position:relative;padding:4% 0 2% 11%;height:20px;line-height:20px;}
.t-nav .active{background:#f0f0f0;}
.t-subk, .t-subz{position:relative;width:100%;}
.t-subnav{position:relative;font-size:12px;padding:4% 0 2% 18.2%;height:19px;line-height:19px;}
.soon{background:transparent url('./img/soon.jpg') no-repeat;background-size:cover;}
.hei{background:transparent url('./img/hei.jpg') no-repeat;background-size:cover;}
.twen{background:transparent url('./img/4.jpg') no-repeat;background-size:cover;}
.twen-txt{position:absolute;overflow-y:scroll;}
.twen-txt img{display:block;width:100%;}
.twen-txt::-webkit-scrollbar-thumb{background:none;}
.twen-txt::-webkit-scrollbar{width:0;background:none;}
.swiper-pagination{top:85%;}
</style></head>
<body>
<div class="container">
  <div class="p1">
    <img class="top-nav2 simg" src="./img/top-nav2.png">
    <div class="top-home simg"></div>
    <div class="navbar-open simg top-click closed" data-id="navbar"></div>
    <div class="contact-us simg top-click" data-id="contact"></div>
  	<div class="swiper-container">
	    <div class="swiper-wrapper">
	      <div class="swiper-slide"><img class="slide-go" data-type="link" data-url="http://carrier.omnimkt.com/iaqcampaign/h5/" src="./img/p1-s1.jpg"></div>
	      <div class="swiper-slide"><img class="slide-go" data-type="click" data-url="hua" src="./img/p1-s2.jpg"></div>
	    </div>
    	<div class="swiper-pagination"></div>
    </div>
  	<div class="contact-us simg top-click" data-id="contact"></div>
  	<img class="p1-ck hide bo simg" src="./img/p1-circle.png">
  	<img class="p1-ch hide bo simg" src="./img/p1-circle.png">
  	<img class="p1-kong simg" src="./img/p1-kong.png">
  	<img class="p1-hu simg" src="./img/p1-hu.png">
  </div>
  
  <div class="t-nav">
    <div class="t-navtxt nav-c" data-id="p1">首页</div>
    <div class="t-navtxt nav-c" data-id="p1">室内空气质量大作战</div>
    <div class="t-navtxt active nav-c" data-id="hua">人人有话说</div>
    <div class="t-navtxt nav-has" data-id="t-subk">室内空气知多少  <img class="nav-a nav-k simg" src="./img/nav-l.png"></div>
    <div class="t-subk hide">
	    <div class="t-subnav nav-c" data-id="iaq">什么是IAQ</div>
	    <div class="t-subnav nav-c" data-id="kongsd">空气的四度</div>
	    <div class="t-subnav nav-c" data-id="kongdz">定制我家空气</div>
	    <div class="t-subnav nav-c" data-id="kongdf">电费计算器</div>
    </div>
    <div class="t-navtxt nav-has" data-id="t-subz">你的呼吸专家 <img class="nav-a nav-z simg" src="./img/nav-l.png"></div>
    <div class="t-subz hide">
	    <div class="t-subnav nav-c">百年开利</div>
	    <div class="t-subnav nav-c">开利黑科技</div>
    </div>
    
  </div>
  
  <div class="kong page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="top-home simg"></div>
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <img class="goback simg" data-id="p1" data-p="kong" src="./img/back.png">
     <img class="kong-ca kong-b hide bo simg" src="./img/p1-circle.png">
  	 <img class="kong-cd kong-b hide bo simg" src="./img/p1-circle.png">
  	 <img class="kong-cz kong-b hide bo simg" src="./img/p1-circle.png">
  	 <img class="kong-cf kong-b hide bo simg" src="./img/p1-circle.png">
  	 <img class="kong-iaq kong-link simg" data-id="ca"   src="./img/kong-iaq.png">
  	 <img class="kong-sd kong-link simg" data-id="cd"  src="./img/kong-sd.png">
  	 <img class="kong-dz kong-link simg" data-id="cz"  src="./img/kong-dz.png">
  	 <img class="kong-df kong-link simg" data-id="cf"  src="./img/kong-df.png">
  </div>
  
  <div id="iaq" class="iaq page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="top-home simg"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <img class="goback simg" data-id="kong" data-p="iaq" src="./img/back.png">
  	 <div class="iaq-dy simg"></div>
  	 <div class="iaq-kq simg"></div>
  	 <div class="iaq-jy simg"></div>
  	 
  	 
  </div>
  
  <div class="huxi page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="top-home simg"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <img class="goback simg" data-id="p1" data-p="huxi" src="./img/back.png">
     <div class="huxi-chaa simg"></div>
     <div class="huxi-chab simg"></div>
  </div>
  
  <div class="hei page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="top-home simg"></div>
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <img class="goback simg" data-id="huxi" data-p="hei" src="./img/back.png">
     <div class="hei-t1 hei-t simg" data-id="t1"></div>
	 <div class="hei-t2 hei-t simg" data-id="t2"></div>
	 <div class="hei-t3 hei-t simg" data-id="t3"></div>
  </div>
  
  <div class="twen page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="top-home simg"></div>
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <div class="twen-back simg"></div>
     <div id="twen-txt" class="twen-txt">
          <img class="twen-t1 simg bn" src="./img/tu-bn.jpg">
          <img class="twen-t1 simg hx" src="./img/tu-hx.jpg">
          <img class="twen-t1 simg pure" src="./img/tu-pure.jpg">
     </div> 
  </div>
  
  <div class="soon page">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="top-home simg"></div>
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <div class="soon-back simg"></div>
  </div>
  
  <div class="hua paged">
     <img class="top-nav2 simg" src="./img/top-nav2.png">
     <div class="navbar-open simg top-click closed" data-id="navbar"></div>
     <div class="top-home simg"></div>
     <div class="contact-us simg top-click" data-id="contact"></div>
     <img class="goback simg" data-id="p1" data-p="hua" src="./img/back.png">
  	 <img class="hua-avatar simg" src="./img/avatar.png">
  	 <div class="hua-title">与氧气美女尚珈丞一起室内空气大冒险</div>
  	 <div class="hua-cha simg" data-url="http://mei94.com"></div>
  	 <div class="hua-content">
  	      <div class="hua-item">
  	         <img class="hua-uimg simg" src="./img/avatar.png">
  	         <div class="hua-msg"><p class="hua-txt"><img class="hua-jiao simg" src="./img/jiao.png">最近空气好闷呀，开个空调在家里宅着</p></div>
  	      </div>
  	      <?php for ($i=0;$i<9;$i++){ ?>
  	      <div class="hua-item">
  	         <img class="hua-uimg simg" src="./img/avatar.png">
  	         <div class="hua-msg"><p class="hua-txt"><img class="hua-jiao simg" src="./img/jiao.png">最近空气好闷呀，开个空, 最近空气好闷呀，开个空最近空气好闷呀，开个空</p></div>
  	      </div>
  	      <?php } ?>
  	 </div>
  	 <div class="hua-shuo">
  	    <img class="hua-shuoimg simg" src="./img/hua-shuo.jpg">
  	    <textarea class="hua-utxt simg txt"></textarea>
  	    <div class="hua-send simg"></div>
  	 </div>
  </div>
  
  <div class="t-bg"></div>
  <div class="contact page">
  	 <div class="contact-body">
  	    <div class="contact-close simg"></div>
  	    <textarea class="contact-msg simg txt" placeholder="请输入您的内容"></textarea>
  	    <input id="contact-name" class="txt" name="name" type="text" placeholder="请输入您的姓名" value="" />
  	    <img class="contact-man contact-sex simg" data-id="man" src="./img/contact-no.png">
  	    <img class="contact-girl contact-sex simg" data-id="girl" src="./img/contact-yes.png">  
  	    <input id="contact-phone" class="txt" name="phone" placeholder="请输入手机号码" type="text" value="" />
  	    <input id="contact-email" class="txt" name="email" placeholder="请输入邮箱" type="text" value="" />
  	    <div class="contact-btn simg"></div>
  	 </div>
  </div>
  
  <div class="js_dialog">
       <div class="weui-mask"></div>
       <div class="weui-dialog">
                <div class="weui-dialog__bd weui-msg"></div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary weui-btn">知道了</a>
                </div>
        </div>
  </div>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://tu-10030004.file.myqcloud.com/pxloader-images.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="./js/jquery.cookie.js"></script>
<script src="./js/swiper.min.js"></script>
<script>
_h=h= Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var sWidth = parseInt((window.innerWidth > 0) ? window.innerWidth : screen.width);
if(sWidth>640){sWidth=640;}
var _rate=(sWidth/640);
if(h<_rate*1031){
	h=_rate*1031;
}
var _img=['p1.jpg'];
var loader = new PxLoader();
for(var i=0; i<_img.length; i++){loader.addImage('<?php echo $url; ?>'+_img[i]);}
loader.start();
loader.addCompletionListener(function(e) {	
	//$(".p1").show().addClass("fade-in");
	$(".hua").show().addClass("fade-in");
});
var _allPage=".p1, .kong, .iaq, .huxi, .hua, .contact, .soon, .hei, .twen";
var _back={'soon':'iaq', 'tu':'p2'}
$(function(){
	$('.container, body').width(sWidth).height(_rate*1031);
	$('.page, .p1').width(sWidth).height(_rate*1031);
	$('.paged').width(sWidth).height(_rate*1031);
    $('.contact-us').width(_rate*100).height(_rate*100).css({"top":_rate*10, "right":_rate*10});
    $('.navbar-open').width(_rate*100).height(_rate*80).css({"top":0, "left":_rate*10});
    $('.top-home').width(_rate*116).height(_rate*80).css({"top":0, "left":_rate*260});
    $('.p1-kong, .p1-ck, .p1-hu, .p1-ch').width(_rate*237).height(_rate*233);
    $('.p1-kong, .p1-ck').css({"top":_rate*646, "left":_rate*40});
    $('.p1-hu, .p1-ch').css({"top":_rate*646, "left":_rate*362});
    $('.top-nav2').width(sWidth).height(_rate*95).css({"top":0, "left":0});
    $('.t-nav').width(_rate*290).css({"top":_rate*94});
    $('.nav-a').width(_rate*23).height(_rate*22).css({"top":_rate*15, "right":_rate*20});
    $('.kong-link, .kong-b').width(_rate*237).height(_rate*233);
    $('.kong-iaq, .kong-ca').css({"top":_rate*324, "left":_rate*38});
    $('.kong-sd, .kong-cd').css({"top":_rate*324, "left":_rate*363});
    $('.kong-dz, .kong-cz').css({"top":_rate*644, "left":_rate*38});
    $('.kong-df, .kong-cf').css({"top":_rate*644, "left":_rate*363});
    $('.iaq-dy, .iaq-kq, .iaq-jy, .hei-t1, .hei-t2, .hei-t3').width(_rate*562).height(_rate*140);
    $('.iaq-dy, .hei-t1').css({"top":_rate*505, "left":_rate*38});
    $('.iaq-kq, .hei-t2').css({"top":_rate*668, "left":_rate*38});
    $('.iaq-jy, .hei-t3').css({"top":_rate*842, "left":_rate*38});
    $('.soon-back, .twen-back').width(_rate*100).height(_rate*80).css({"top":_rate*194, "right":0});
    $('.twen-txt').width(_rate*562).height(_rate*712).css({"top":_rate*272, "left":_rate*38});
    var _cha=10;
    var _tmpH=_rate*861;
    if(h > _tmpH){
    	_cha=(h-_tmpH)/2;
    }
    $('.contact-body').width(sWidth).height(_tmpH).css({"top":_cha, "left":0});
    $('.contact-msg').width(_rate*440).height(_rate*290).css({"top":_rate*89, "left":_rate*88});
    $('#contact-name').width(_rate*388).height(_rate*60).css({"top":_rate*439, "left":_rate*168});
    $('.contact-man, .contact-girl').width(_rate*31).height(_rate*31);
    $('.contact-man').css({"top":_rate*523, "left":_rate*163});
    $('.contact-girl').css({"top":_rate*523, "left":_rate*254});
    $('#contact-phone').width(_rate*322).height(_rate*60).css({"top":_rate*578, "left":_rate*168,'paddingLeft':_rate*66});
    $('#contact-email').width(_rate*388).height(_rate*60).css({"top":_rate*662, "left":_rate*168});
    $('.contact-close').width(_rate*100).height(_rate*70).css({"top":0, "right":_rate*38});
    $('.contact-btn').width(_rate*262).height(_rate*70).css({"top":_rate*760, "left":_rate*188});
    $('.hua-avatar').width(_rate*167).height(_rate*165).css({"top":_rate*264, "left":_rate*62});
    $('.hua-title').width(_rate*290).css({"top":_rate*304, "left":_rate*260});
    $('.hua-cha').width(_rate*150).height(_rate*46).css({"top":_rate*408, "left":_rate*410});
    $('.hua-content').height(_rate*336).css({"top":_rate*496});
    $('.hua-uimg').width(_rate*94).height(_rate*94).css({"top":_rate*10, "left":_rate*62});
    $('.hua-msg').width(_rate*350).css({"top":_rate*16, "left":_rate*202});
    $('.hua-jiao').width(_rate*16).height(_rate*23).css({"left":-_rate*16});
    $('.hua-item').height(_rate*125);
    $('.hua-shuo').height(_rate*200).css({"top":_rate*822});
    $('.hua-shuoimg').width(sWidth).height(_rate*190).css({"top":0, "left":0});
    $('.hua-utxt').width(_rate*557).height(_rate*85).css({"top":_rate*14, "left":_rate*40});
    $('.hua-send').width(_rate*262).height(_rate*70).css({"top":_rate*114, "left":_rate*190});
    $('.huxi-chaa').width(_rate*134).height(_rate*40).css({"top":_rate*548, "left":_rate*442});
    $('.huxi-chab').width(_rate*134).height(_rate*40).css({"top":_rate*950, "left":_rate*442});
    $('.goback').width(_rate*81).height(_rate*89).css({"top":_rate*108, "right":_rate*20});
    

    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
    	$('body').css({"overflow":'hidden'});
    }
    document.body.ontouchmove = function (e) {
        e.preventDefault();
    }
    var startX = 0, startY = 0;  
    function touchSatrtFunc(evt) {
        try
        {
            var touch = evt.touches[0]; 
            var x = Number(touch.pageX); 
            var y = Number(touch.pageY);
            startX = x;
            startY = y;
        } catch (e) {
            
        }
    }
    function _move(ev, _ele){
    	var _point = ev.touches[0],
        _top = _ele.scrollTop;
		var _bottomFaVal = _ele.scrollHeight - _ele.offsetHeight;
		if (_top === 0) {
		    if (_point.clientY > startY) {
		        ev.preventDefault();
		    } else {
		        ev.stopPropagation();
		    }
		} else if (_top === _bottomFaVal) {
		    if (_point.clientY < startY) {
		        ev.preventDefault();
		    } else {
		        ev.stopPropagation();
		    }
		} else if (_top > 0 && _top < _bottomFaVal) {
		    ev.stopPropagation();
		} else {
		    ev.preventDefault();
		}
    }
    document.addEventListener('touchstart', touchSatrtFunc, false);
    var _twen = document.getElementById("twen-txt");
    _twen.ontouchmove = function (ev) {_move(ev, _twen);};
    var _iaq = document.getElementById("iaq");
    _iaq.ontouchmove = function (ev) {_move(ev, _iaq);};
    
    $('.hei-t').click(function(){
         var _id=$(this).attr("data-id");
         if('t3' == _id){
            $(".hei").fadeOut();
            $(".soon").fadeIn();
            _back.soon="hei";
        	return;
         }
         console.log(_id);
    });
    
    
    var _sex='girl'
    $('.contact-sex').click(function(){
        var _id=$(this).attr("data-id");
        if('man' == _id){
        	_sex='man';
            $(".contact-man").attr("src","./img/contact-yes.png");
            $(".contact-girl").attr("src","./img/contact-no.png");
        }else{
        	_sex='girl'
        	$(".contact-man").attr("src","./img/contact-no.png");
            $(".contact-girl").attr("src","./img/contact-yes.png"); 
        }
    });

    $('.nav-c').click(function(){
         var _id=$(this).attr("data-id");
         $('.t-nav').hide();
         $(".navbar-open").addClass("closed");
         if(_id == 'hua'){
            $(_allPage).hide();
            $(".hua").fadeIn();
         }
         if(_id == 'p1'){
             $(_allPage).hide();
             $(".p1").fadeIn();
         }
         if(_id == 'iaq'){
             $(_allPage).hide();
             $(".iaq").fadeIn();
         }
         console.log(_id);
    });

    $('.iaq-dy, .iaq-kq, .iaq-jy').click(function(){
        $(".soon").fadeIn();
        $(".iaq").fadeOut();
        _back.soon="iaq";
    });
    
    $('.goback').click(function(){
        var _id=$(this).attr("data-id");
        var _p=$(this).attr("data-p");
        $("."+_p).fadeOut();
        $("."+_id).fadeIn();
    });

 
    $('.twen-back').click(function(){
        $(".twen").fadeOut();
        $("."+_back.tu).fadeIn();
    });
    $('.soon-back').click(function(){
        $(".soon").fadeOut();
        $("."+_back.soon).fadeIn();
    });
    $('.hua-send').click(function(){
       var _huaData=$(".hua-utxt").val();
       if('' == _huaData){
    	   $(".weui-msg").html("请输入内容");
	       $(".js_dialog").show();
	       return;
       } 
       $.post("./api/?c=hua", {hua:_huaData}, function(data){
	       	$(".weui-msg").html("留言成功");
	       	$(".js_dialog").show();
	       	$(".hua-utxt").val("");
       }, "json");
    });

    $('.nav-has').click(function(){
        var _id=$(this).attr("data-id");
        if('t-subk' == _id){
           if($(".t-subk").hasClass("hide")){
        	   $(".t-subk").removeClass("hide");
        	   $(".nav-k").attr("src",'./img/nav-d.png');
           }else{
        	   $(".nav-k").attr("src",'./img/nav-l.png');
        	   $(".t-subk").addClass("hide");
           }
        }else{
        	if($(".t-subz").hasClass("hide")){
         	   $(".t-subz").removeClass("hide");
         	   $(".nav-z").attr("src",'./img/nav-d.png');
            }else{
         	   $(".nav-z").attr("src",'./img/nav-l.png');
         	   $(".t-subz").addClass("hide");
            }
        }
        console.log(_id);
     });

    
    
    $('.slide-go').click(function(){
         var _this=$(this);
         var _type=$(this).attr("data-type");
         var _url=$(this).attr("data-url");
         console.log(_type);
         if('link' == _type){
             window.location.href=_url;
         }else if('click' == _type){
            $(".p1").hide();
            $("."+_url).fadeIn();
         }
    
    });
    
    $('.swiper-container ').width(sWidth).height(_rate*340).css({"top":_rate*206, "left":0});
    
    var swiper = new Swiper('.swiper-container', {
    	autoplay: true,
    	loop:true,
        pagination: {el: '.swiper-pagination'},
      });

    $('.kong-link').click(function(){
        var _id=$(this).attr("data-id");
        console.log(_id);
        $('.kong-'+_id).show();
        if('ca' == _id){
            window.setTimeout(function(){
            	$('.kong-'+_id).hide();
            	$(".kong").fadeOut();
            	$(".iaq").fadeIn();
                }, 600);
        }else if('cd' == _id){
        	window.setTimeout(function(){
            	 window.location.href="http://brand.fugumobile.cn/Carrier/airlife/air.html";
                }, 600);
        }else if('cf' == _id){
        	window.setTimeout(function(){
           	 	  window.location.href="http://brand.fugumobile.cn/Carrier/airlife/e_calculator.html";
               }, 600);
        }else if('cz' == _id){
        	window.setTimeout(function(){
           	 	  window.location.href="http://brand.fugumobile.cn/Carrier/airlife/customize.html";
               }, 600);
        }
    });
    
    $('.p1-kong').click(function(){
        $('.p1-ck').show();
        window.setTimeout(function(){
            $(".p1").hide();
        	$(".kong").fadeIn();
        	$('.p1-ck').hide();
            }, 600);
    });
    $('.p1-hu').click(function(){
        $('.p1-ch').show();
        window.setTimeout(function(){
        	$(".p1").hide();
        	$(".huxi").fadeIn();
        	$('.p1-ch').hide();
            }, 600);
    });

    $('.huxi-chaa').click(function(){
         $(".huxi").fadeOut();
         $(".twen-t1").hide();
         $(".bn").show();
         $(".twen").fadeIn();
         _back.tu='huxi';
         $('body').css({"overflow":'hidden'});
         
    });
    $('.hei-t1').click(function(){
        $(".hei").fadeOut();
        $(".twen-t1").hide();
        $(".pure").show();
        $(".twen").fadeIn();
        _back.tu='hei';
         
    });
    $('.hei-t2').click(function(){
        $(".hei").fadeOut();
        $(".twen-t1").hide();
        $(".hx").show();
        $(".twen").fadeIn();
        _back.tu='hei';
         
    });
    $('.huxi-chab').click(function(){
    	$(".huxi").fadeOut();
    	$(".hei").fadeIn();
   });

    $('.top-home').click(function(){
        $(_allPage).fadeOut();
        $(".p1").fadeIn();
    });
 
    $('.contact-btn').click(function(){
        var _msg=$(".contact-msg").val();
        var _name=$("#contact-name").val();
        var _phone=$("#contact-phone").val();
        var _email=$("#contact-email").val();
        if('' == _name){
        	$(".weui-msg").html("请输入您的姓名");
        	$(".js_dialog").show();
            return;
        }
        if('' == _phone && '' === _email){
        	$(".weui-msg").html("请输入手机号或邮箱");
        	$(".js_dialog").show();
            return;
        }
 
        $.post("./api/?c=liuyan", {name:_name,msg:_msg,sex:_sex,phone:_phone,email:_email}, function(data){
        	$('.contact, .t-bg').fadeOut();
        	$(".weui-msg").html("留言成功");
        	$(".js_dialog").show();
             _hasDoneReg=true;
        }, "json");
        
    });
    
    $('.contact-close').click(function(){
        $('.contact, .t-bg').fadeOut();
    });
    $('.top-click').click(function(){
        var _id=$(this).attr("data-id");
        if('contact' == _id){
        	$('.contact, .t-bg').fadeIn();
        	$(".navbar-open").addClass("closed");
    		$('.t-nav').fadeOut();
        }
        if('navbar' == _id){
        	if($(".navbar-open").hasClass("closed")){
        		$(".navbar-open").removeClass("closed");
        		$('.t-nav').fadeIn();
        		$('.contact').fadeOut();
            }else{
            	$(".navbar-open").addClass("closed");
        		$('.t-nav').fadeOut();
            }
        }
    });
     
    
	wx.config({
		appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,
		nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',
		jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage','onMenuShareQQ','showMenuItems','showOptionMenu']
	});
	wx.ready(function () {
		    var _title='';
		    var _desc='Miller米粒 打扫房间的速度超过了90%的人，你敢挑战吗？';
		    var _link='http://mei94.com/carrier/';
		    var _imgUrl='http://mei94.com/carrier/img/64.jpg';
			wx.onMenuShareTimeline({title: _desc, link: _link, imgUrl: _imgUrl,success: function () {},cancel: function () { }});
			wx.onMenuShareAppMessage({ title: _title, desc: _desc,link: _link,imgUrl: _imgUrl, type: '', dataUrl: '', success: function () {},cancel: function () {  }});  	
	});
	$(".weui-btn").click(function(){
        $(".js_dialog").hide();
	});
	if(!('placeholder' in document.createElement('input')) ){   
	    $('input[placeholder],textarea[placeholder]').each(function(){var that = $(this),text= that.attr('placeholder');   
	      if(that.val()===""){that.val(text).addClass('placeholder');}   
	      that.focus(function(){if(that.val()===text){that.val("").removeClass('placeholder');}})   
	      .blur(function(){if(that.val()===""){that.val(text).addClass('placeholder');}})   
	      .closest('form').submit(function(){   
	        if(that.val() === text){that.val('');}});});   
	 }
});
</script></body>
</html>